import java.util.Scanner;


public class test {
public static int jie(int i ){
    if(i == 1){
        return 1;
    }
    return i * jie(i - 1);
}
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int i = scan.nextInt();
        System.out.println(jie(i));
    }
}
